<?php ob_start(); ?>
Hệ thống quản lý học viên
<?php
@session_start();
if ($_SESSION['user_id'] != '') {
  $con = mysql_connect("localhost", "root", "");
  if (!$con) {
    die('Could not connect: ' . mysql_error());
  }
  if ($_SESSION['user_admin'] == 3) {
    echo 'Hãy click các tùy chọn trên menu đê xem thông tin';
  }
  else {
    mysql_select_db("giasuket_qlhs", $con);


    $result = mysql_query("SELECT * FROM comment  ORDER BY id DESC LIMIT 0,130 ");
    if ($_SESSION['user_admin'] == 2) {
      $result = mysql_query("SELECT * FROM comment WHERE mhs in (SELECT f_maphieu FROM tbl_thuphieu WHERE f_khoa =2) ORDER BY id DESC LIMIT 0,130 ");
    }
    echo '<div class=tablecomment><br>';
    while ($row = mysql_fetch_array($result)) {
      if ($_SESSION['user_admin'] == 1)
        echo "<b><li>" . $row['author'] . '  (' . $row['date'] . ')</b>:' . $row['comment'] . "<a href='delete.comment.php?stt=" . $row['id'] . "'>(Xóa)</a>" . "<a href='edit.php?stt=" . $row['mhs'] . "'>(Link)</a>";
      else
        echo "<b><li>" . $row['author'] . '  (' . $row['date'] . ')</b>:' . $row['comment'] . "<a href='edit.php?stt=" . $row['mhs'] . "'>(Link)</a>";

      echo "</li>";
    }
    echo '<br></div>';
  }
}
?>

<style>
  *{margin:0px; padding:0px;}
  label{
    display:block;
    width:200px;
    float:left;
  }
  .submit{
    width:100;
    margin-left:50;

  }
  .comment{
    background-color: white;
    padding-left:100;
    font-family:Tahoma, Geneva, sans-serif
  }
  .mhs{
    display:none;
  }
  .tablecomment{
    width: 910;
    margin: 30;
    border-style:solid;
    border-color:white;
    background-color: #CCCCCC;
    border-radius: 15px;
  }
  .tablecomment li{
    background-color:#EEEEEE;
    list-style:none;
    margin-left:10;
    margin-right:10;
  }
</style>